package com.eis.admin.mvc.bean;

import com.eis.persist.model.user.PersistUser;


public class UserBean {
	private int userId;
	private String userName;
	private String password;
	private int sysGroup;
	private int bizGroup;
	private String email;
	private String passwordrep;
	
	public UserBean() {
		
	}
	
	public UserBean(String userName, int sysGroup, int bizGroup) {
		this.userName = userName;
		this.sysGroup = sysGroup;
		this.bizGroup = bizGroup;
	}
	
	public UserBean(PersistUser persistUser) {
		this.userName = persistUser.getName();
		this.sysGroup = persistUser.getSysGroup() != null ? persistUser.getSysGroup().getId() : -1;
		this.bizGroup = persistUser.getBizGroup() != null ? persistUser.getBizGroup().getId() : -1;
		this.userId = persistUser.getId();
		this.email = persistUser.getEmail();
	}

	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public int getSysGroup() {
		return sysGroup;
	}
	public void setSysGroup(int sysGroup) {
		this.sysGroup = sysGroup;
	}
	public int getBizGroup() {
		return bizGroup;
	}
	public void setBizGroup(int bizGroup) {
		this.bizGroup = bizGroup;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPasswordrep() {
		return passwordrep;
	}
	public void setPasswordrep(String passwordrep) {
		this.passwordrep = passwordrep;
	}
}
